package com.person.mall.controller;

import com.github.pagehelper.PageInfo;
import com.person.mall.service.ICategoryService;
import com.person.mall.vo.CategoryVo;
import com.person.mall.vo.ResponseVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 最酷的桃儿wjc
 * * @date 2022/5/16
 */
@RestController
public class CategoryController {
    @Autowired
    private ICategoryService iCategoryService;

    @GetMapping("/categories")
    public ResponseVo<List<CategoryVo>> getCategories(){
        ResponseVo<List<CategoryVo>> listResponseVo = iCategoryService.selectAll();
        return listResponseVo;
    }

}
